Optimal. Leaf size=171 \[ \frac {(a+b x)^5 \left (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )}{5 b}-\frac {B n (b c-a d)^5 \log (c+d x)}{5 b d^5}+\frac {B n x (b c-a d)^4}{5 d^4}-\frac {B n (a+b x)^2 (b c-a d)^3}{10 b d^3}+\frac {B n (a+b x)^3 (b c-a d)^2}{15 b d^2}-\frac {B n (a+b x)^4 (b c-a d)}{20 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 183, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {6742, 2492, 43} \[ \frac {A (a+b x)^5}{5 b}+\frac {B n x (b c-a d)^4}{5 d^4}-\frac {B n (a+b x)^2 (b c-a d)^3}{10 b d^3}+\frac {B n (a+b x)^3 (b c-a d)^2}{15 b d^2}-\frac {B n (b c-a d)^5 \log (c+d x)}{5 b d^5}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}-\frac {B n (a+b x)^4 (b c-a d)}{20 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 43
Rule 2492
Rule 6742
Rubi steps
\begin {align*} \int (a+b x)^4 \left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx &=\int \left (A (a+b x)^4+B (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right ) \, dx\\ &=\frac {A (a+b x)^5}{5 b}+B \int (a+b x)^4 \log \left (e (a+b x)^n (c+d x)^{-n}\right ) \, dx\\ &=\frac {A (a+b x)^5}{5 b}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}-\frac {(B (b c-a d) n) \int \frac {(a+b x)^4}{c+d x} \, dx}{5 b}\\ &=\frac {A (a+b x)^5}{5 b}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}-\frac {(B (b c-a d) n) \int \left (-\frac {b (b c-a d)^3}{d^4}+\frac {b (b c-a d)^2 (a+b x)}{d^3}-\frac {b (b c-a d) (a+b x)^2}{d^2}+\frac {b (a+b x)^3}{d}+\frac {(-b c+a d)^4}{d^4 (c+d x)}\right ) \, dx}{5 b}\\ &=\frac {B (b c-a d)^4 n x}{5 d^4}-\frac {B (b c-a d)^3 n (a+b x)^2}{10 b d^3}+\frac {B (b c-a d)^2 n (a+b x)^3}{15 b d^2}-\frac {B (b c-a d) n (a+b x)^4}{20 b d}+\frac {A (a+b x)^5}{5 b}-\frac {B (b c-a d)^5 n \log (c+d x)}{5 b d^5}+\frac {B (a+b x)^5 \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{5 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.81, size = 364, normalized size = 2.13 \[ \frac {-48 a^5 B d^5 n \log (a+b x)+b d x \left (12 a^4 d^4 (5 A+4 B n)+12 a^3 b d^3 (10 A d x-10 B c n+3 B d n x)+4 a^2 b^2 d^2 \left (30 A d^2 x^2+B n \left (30 c^2-15 c d x+4 d^2 x^2\right )\right )+a b^3 d \left (60 A d^3 x^3+B n \left (-60 c^3+30 c^2 d x-20 c d^2 x^2+3 d^3 x^3\right )\right )+b^4 \left (12 A d^4 x^4+B c n \left (12 c^3-6 c^2 d x+4 c d^2 x^2-3 d^3 x^3\right )\right )\right )-12 B n \left (-5 a^5 d^5+5 a^4 b c d^4-10 a^3 b^2 c^2 d^3+10 a^2 b^3 c^3 d^2-5 a b^4 c^4 d+b^5 c^5\right ) \log (c+d x)+12 B d^5 \left (5 a^5+5 a^4 b x+10 a^3 b^2 x^2+10 a^2 b^3 x^3+5 a b^4 x^4+b^5 x^5\right ) \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{60 b d^5} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.77, size = 563, normalized size = 3.29 \[ \frac {12 \, A b^{5} d^{5} x^{5} + 3 \, {\left (20 \, A a b^{4} d^{5} - {\left (B b^{5} c d^{4} - B a b^{4} d^{5}\right )} n\right )} x^{4} + 4 \, {\left (30 \, A a^{2} b^{3} d^{5} + {\left (B b^{5} c^{2} d^{3} - 5 \, B a b^{4} c d^{4} + 4 \, B a^{2} b^{3} d^{5}\right )} n\right )} x^{3} + 6 \, {\left (20 \, A a^{3} b^{2} d^{5} - {\left (B b^{5} c^{3} d^{2} - 5 \, B a b^{4} c^{2} d^{3} + 10 \, B a^{2} b^{3} c d^{4} - 6 \, B a^{3} b^{2} d^{5}\right )} n\right )} x^{2} + 12 \, {\left (5 \, A a^{4} b d^{5} + {\left (B b^{5} c^{4} d - 5 \, B a b^{4} c^{3} d^{2} + 10 \, B a^{2} b^{3} c^{2} d^{3} - 10 \, B a^{3} b^{2} c d^{4} + 4 \, B a^{4} b d^{5}\right )} n\right )} x + 12 \, {\left (B b^{5} d^{5} n x^{5} + 5 \, B a b^{4} d^{5} n x^{4} + 10 \, B a^{2} b^{3} d^{5} n x^{3} + 10 \, B a^{3} b^{2} d^{5} n x^{2} + 5 \, B a^{4} b d^{5} n x + B a^{5} d^{5} n\right )} \log \left (b x + a\right ) - 12 \, {\left (B b^{5} d^{5} n x^{5} + 5 \, B a b^{4} d^{5} n x^{4} + 10 \, B a^{2} b^{3} d^{5} n x^{3} + 10 \, B a^{3} b^{2} d^{5} n x^{2} + 5 \, B a^{4} b d^{5} n x + {\left (B b^{5} c^{5} - 5 \, B a b^{4} c^{4} d + 10 \, B a^{2} b^{3} c^{3} d^{2} - 10 \, B a^{3} b^{2} c^{2} d^{3} + 5 \, B a^{4} b c d^{4}\right )} n\right )} \log \left (d x + c\right ) + 12 \, {\left (B b^{5} d^{5} x^{5} + 5 \, B a b^{4} d^{5} x^{4} + 10 \, B a^{2} b^{3} d^{5} x^{3} + 10 \, B a^{3} b^{2} d^{5} x^{2} + 5 \, B a^{4} b d^{5} x\right )} \log \relax (e)}{60 \, b d^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 11.53, size = 497, normalized size = 2.91 \[ \frac {B a^{5} n \log \left (b x + a\right )}{5 \, b} + \frac {1}{5} \, {\left (A b^{4} + B b^{4}\right )} x^{5} - \frac {{\left (B b^{4} c n - B a b^{3} d n - 20 \, A a b^{3} d - 20 \, B a b^{3} d\right )} x^{4}}{20 \, d} + \frac {{\left (B b^{4} c^{2} n - 5 \, B a b^{3} c d n + 4 \, B a^{2} b^{2} d^{2} n + 30 \, A a^{2} b^{2} d^{2} + 30 \, B a^{2} b^{2} d^{2}\right )} x^{3}}{15 \, d^{2}} + \frac {1}{5} \, {\left (B b^{4} n x^{5} + 5 \, B a b^{3} n x^{4} + 10 \, B a^{2} b^{2} n x^{3} + 10 \, B a^{3} b n x^{2} + 5 \, B a^{4} n x\right )} \log \left (b x + a\right ) - \frac {1}{5} \, {\left (B b^{4} n x^{5} + 5 \, B a b^{3} n x^{4} + 10 \, B a^{2} b^{2} n x^{3} + 10 \, B a^{3} b n x^{2} + 5 \, B a^{4} n x\right )} \log \left (d x + c\right ) - \frac {{\left (B b^{4} c^{3} n - 5 \, B a b^{3} c^{2} d n + 10 \, B a^{2} b^{2} c d^{2} n - 6 \, B a^{3} b d^{3} n - 20 \, A a^{3} b d^{3} - 20 \, B a^{3} b d^{3}\right )} x^{2}}{10 \, d^{3}} + \frac {{\left (B b^{4} c^{4} n - 5 \, B a b^{3} c^{3} d n + 10 \, B a^{2} b^{2} c^{2} d^{2} n - 10 \, B a^{3} b c d^{3} n + 4 \, B a^{4} d^{4} n + 5 \, A a^{4} d^{4} + 5 \, B a^{4} d^{4}\right )} x}{5 \, d^{4}} - \frac {{\left (B b^{4} c^{5} n - 5 \, B a b^{3} c^{4} d n + 10 \, B a^{2} b^{2} c^{3} d^{2} n - 10 \, B a^{3} b c^{2} d^{3} n + 5 \, B a^{4} c d^{4} n\right )} \log \left (-d x - c\right )}{5 \, d^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.78, size = 2374, normalized size = 13.88 \[ \text {Expression too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.47, size = 671, normalized size = 3.92 \[ \frac {1}{5} \, B b^{4} x^{5} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + \frac {1}{5} \, A b^{4} x^{5} + B a b^{3} x^{4} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a b^{3} x^{4} + 2 \, B a^{2} b^{2} x^{3} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + 2 \, A a^{2} b^{2} x^{3} + 2 \, B a^{3} b x^{2} \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + 2 \, A a^{3} b x^{2} + B a^{4} x \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right ) + A a^{4} x + \frac {{\left (\frac {a e n \log \left (b x + a\right )}{b} - \frac {c e n \log \left (d x + c\right )}{d}\right )} B a^{4}}{e} - \frac {2 \, {\left (\frac {a^{2} e n \log \left (b x + a\right )}{b^{2}} - \frac {c^{2} e n \log \left (d x + c\right )}{d^{2}} + \frac {{\left (b c e n - a d e n\right )} x}{b d}\right )} B a^{3} b}{e} + \frac {{\left (\frac {2 \, a^{3} e n \log \left (b x + a\right )}{b^{3}} - \frac {2 \, c^{3} e n \log \left (d x + c\right )}{d^{3}} - \frac {{\left (b^{2} c d e n - a b d^{2} e n\right )} x^{2} - 2 \, {\left (b^{2} c^{2} e n - a^{2} d^{2} e n\right )} x}{b^{2} d^{2}}\right )} B a^{2} b^{2}}{e} - \frac {{\left (\frac {6 \, a^{4} e n \log \left (b x + a\right )}{b^{4}} - \frac {6 \, c^{4} e n \log \left (d x + c\right )}{d^{4}} + \frac {2 \, {\left (b^{3} c d^{2} e n - a b^{2} d^{3} e n\right )} x^{3} - 3 \, {\left (b^{3} c^{2} d e n - a^{2} b d^{3} e n\right )} x^{2} + 6 \, {\left (b^{3} c^{3} e n - a^{3} d^{3} e n\right )} x}{b^{3} d^{3}}\right )} B a b^{3}}{6 \, e} + \frac {{\left (\frac {12 \, a^{5} e n \log \left (b x + a\right )}{b^{5}} - \frac {12 \, c^{5} e n \log \left (d x + c\right )}{d^{5}} - \frac {3 \, {\left (b^{4} c d^{3} e n - a b^{3} d^{4} e n\right )} x^{4} - 4 \, {\left (b^{4} c^{2} d^{2} e n - a^{2} b^{2} d^{4} e n\right )} x^{3} + 6 \, {\left (b^{4} c^{3} d e n - a^{3} b d^{4} e n\right )} x^{2} - 12 \, {\left (b^{4} c^{4} e n - a^{4} d^{4} e n\right )} x}{b^{4} d^{4}}\right )} B b^{4}}{60 \, e} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.56, size = 936, normalized size = 5.47 \[ x^4\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{20\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{20\,d}\right )-x^3\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{15\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{3\,d}+\frac {A\,a\,b^3\,c}{3\,d}\right )+\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (B\,a^4\,x+2\,B\,a^3\,b\,x^2+2\,B\,a^2\,b^2\,x^3+B\,a\,b^3\,x^4+\frac {B\,b^4\,x^5}{5}\right )+x\,\left (\frac {a^3\,\left (5\,A\,a\,d+10\,A\,b\,c+2\,B\,a\,d\,n-2\,B\,b\,c\,n\right )}{d}-\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {2\,a^2\,b\,\left (5\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{5\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^3\,c}{d}\right )}{5\,b\,d}-\frac {a\,c\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{b\,d}\right )}{5\,b\,d}+\frac {a\,c\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{5\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^3\,c}{d}\right )}{b\,d}\right )+x^2\,\left (\frac {a^2\,b\,\left (5\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {\left (5\,a\,d+5\,b\,c\right )\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{5\,b\,d}-\frac {a\,b^2\,\left (10\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{d}+\frac {A\,a\,b^3\,c}{d}\right )}{10\,b\,d}-\frac {a\,c\,\left (\frac {b^3\,\left (25\,A\,a\,d+5\,A\,b\,c+B\,a\,d\,n-B\,b\,c\,n\right )}{5\,d}-\frac {A\,b^3\,\left (5\,a\,d+5\,b\,c\right )}{5\,d}\right )}{2\,b\,d}\right )+\frac {A\,b^4\,x^5}{5}-\frac {\ln \left (c+d\,x\right )\,\left (5\,B\,n\,a^4\,c\,d^4-10\,B\,n\,a^3\,b\,c^2\,d^3+10\,B\,n\,a^2\,b^2\,c^3\,d^2-5\,B\,n\,a\,b^3\,c^4\,d+B\,n\,b^4\,c^5\right )}{5\,d^5}+\frac {B\,a^5\,n\,\ln \left (a+b\,x\right )}{5\,b} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: HeuristicGCDFailed} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________